package com.gkj.blog.framework.object;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.util.Date;

public abstract class BaseEntityVo implements Serializable{
    private AbstractDO abstractDO;

    public void setAbstractDO(AbstractDO abstractDO){
        this.abstractDO=abstractDO;
    }

    @JsonIgnore
    public AbstractDO getAbstractDo(){
        return abstractDO;
    }

    public Long getId() {
        return abstractDO.getId();
    }

    public void setId(Long id) {
        abstractDO.setId(id);
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    public Date getCreateTime() {
        return abstractDO.getCreateTime();
    }

    public void setCreateTime(Date createTime) {
        abstractDO.setCreateTime(createTime);
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    public Date getUpdateTime() {
        return abstractDO.getUpdateTime();
    }

    public void setUpdateTime(Date updateTime) {
        abstractDO.setUpdateTime(updateTime);
    }
}
